package com.crm.mapper;

import com.crm.vo.IndexStatisticsVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.time.LocalDate;
import java.util.List;
import java.util.Map;

@Mapper
public interface BusinessMapper {
    @Select("select count(id) from tb_business where status in(1,2) and date(create_time) between #{beginCreateTime} and #{endCreateTime} and clue_id is not null ")
    Integer countByClue(LocalDate beginCreateTime, LocalDate endCreateTime);


    List<Map<String, Object>> countAllContractByUser(IndexStatisticsVo indexStatisticsVo);
    @Select("select count(id) from tb_business where date(create_time) between #{beginCreateTime} and #{endCreateTime}")
    Integer countAllBusiness(String beginCreateTime, String endCreateTime);
}
